-
Notifications
You must be signed in to change notification settings - Fork 47.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete test-utils implementation of act
#21703
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since it's dev-only now, we can use the one provided by the reconciler.
facebook-github-bot
added
CLA Signed
React Core Team
Opened by a member of the React Core Team
labels
Jun 18, 2021
Comparing: 568dc35...b5debd5 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
sebmarkbage
reviewed
Jun 18, 2021
This was referenced Jun 22, 2021
rickhanlonii
approved these changes
Jun 22, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pair reviewed offline online
facebook-github-bot
pushed a commit
to facebookexperimental/Recoil
that referenced
this pull request
Jun 27, 2021
Summary: Includes a re-implementation of the `act` testing API to decouple it from the mock Scheduler module. Because our Jest configuration mocks the Scheduler for all tests in www, some tests had become accidentally coupled to it. I had to update ~60 test files. The most common pattern I found was people calling `act()` with a no-op function, which had the effect of flushing all pending work. This no longer works in the new implementation. (We will eventually provide a way to opt into Scheduler mocking for advanced cases, but it probably won't be the default.) The fix was usually to wrap an earlier update in `act` to ensure that all its work is fully flushed. --- This sync includes the following changes: - **[27c9c95e2](facebook/react@27c9c95e2)**: act: Bypass microtask for "default sync" updates ([#21740](facebook/react#21740)) //<Andrew Clark>// - **[e577bfb1c](facebook/react@e577bfb1c)**: Add tests for invokeGuardedCallback ([#21734](facebook/react#21734)) //<Dan Abramov>// - **[355591add](facebook/react@355591add)**: Next/experimental release versions include commit date ([#21700](facebook/react#21700)) //<Brian Vaughn>// - **[d7dce572c](facebook/react@d7dce572c)**: Remove internal `act` builds from public modules ([#21721](facebook/react#21721)) //<Andrew Clark>// - **[06f7b4f43](facebook/react@06f7b4f43)**: `act` should work without mock Scheduler ([#21714](facebook/react#21714)) //<Andrew Clark>// - **[422e0bb36](facebook/react@422e0bb36)**: Delete test-utils implementation of `act` ([#21703](facebook/react#21703)) //<Andrew Clark>// Reviewed By: rickhanlonii Differential Revision: D29314763 fbshipit-source-id: 6c53a053e00defee0ab89f30e2f6bd2a1ff29bce
AlexGuz23
pushed a commit
to AlexGuz23/Recoil
that referenced
this pull request
Nov 3, 2022
Summary: Includes a re-implementation of the `act` testing API to decouple it from the mock Scheduler module. Because our Jest configuration mocks the Scheduler for all tests in www, some tests had become accidentally coupled to it. I had to update ~60 test files. The most common pattern I found was people calling `act()` with a no-op function, which had the effect of flushing all pending work. This no longer works in the new implementation. (We will eventually provide a way to opt into Scheduler mocking for advanced cases, but it probably won't be the default.) The fix was usually to wrap an earlier update in `act` to ensure that all its work is fully flushed. --- This sync includes the following changes: - **[27c9c95e2](facebook/react@27c9c95e2)**: act: Bypass microtask for "default sync" updates ([#21740](facebook/react#21740)) //<Andrew Clark>// - **[e577bfb1c](facebook/react@e577bfb1c)**: Add tests for invokeGuardedCallback ([#21734](facebook/react#21734)) //<Dan Abramov>// - **[355591add](facebook/react@355591add)**: Next/experimental release versions include commit date ([#21700](facebook/react#21700)) //<Brian Vaughn>// - **[d7dce572c](facebook/react@d7dce572c)**: Remove internal `act` builds from public modules ([#21721](facebook/react#21721)) //<Andrew Clark>// - **[06f7b4f43](facebook/react@06f7b4f43)**: `act` should work without mock Scheduler ([#21714](facebook/react#21714)) //<Andrew Clark>// - **[422e0bb36](facebook/react@422e0bb36)**: Delete test-utils implementation of `act` ([#21703](facebook/react#21703)) //<Andrew Clark>// Reviewed By: rickhanlonii Differential Revision: D29314763 fbshipit-source-id: 6c53a053e00defee0ab89f30e2f6bd2a1ff29bce
snipershooter0701
pushed a commit
to snipershooter0701/Recoil
that referenced
this pull request
Mar 5, 2023
Summary: Includes a re-implementation of the `act` testing API to decouple it from the mock Scheduler module. Because our Jest configuration mocks the Scheduler for all tests in www, some tests had become accidentally coupled to it. I had to update ~60 test files. The most common pattern I found was people calling `act()` with a no-op function, which had the effect of flushing all pending work. This no longer works in the new implementation. (We will eventually provide a way to opt into Scheduler mocking for advanced cases, but it probably won't be the default.) The fix was usually to wrap an earlier update in `act` to ensure that all its work is fully flushed. --- This sync includes the following changes: - **[27c9c95e2](facebook/react@27c9c95e2)**: act: Bypass microtask for "default sync" updates ([#21740](facebook/react#21740)) //<Andrew Clark>// - **[e577bfb1c](facebook/react@e577bfb1c)**: Add tests for invokeGuardedCallback ([#21734](facebook/react#21734)) //<Dan Abramov>// - **[355591add](facebook/react@355591add)**: Next/experimental release versions include commit date ([#21700](facebook/react#21700)) //<Brian Vaughn>// - **[d7dce572c](facebook/react@d7dce572c)**: Remove internal `act` builds from public modules ([#21721](facebook/react#21721)) //<Andrew Clark>// - **[06f7b4f43](facebook/react@06f7b4f43)**: `act` should work without mock Scheduler ([#21714](facebook/react#21714)) //<Andrew Clark>// - **[422e0bb36](facebook/react@422e0bb36)**: Delete test-utils implementation of `act` ([#21703](facebook/react#21703)) //<Andrew Clark>// Reviewed By: rickhanlonii Differential Revision: D29314763 fbshipit-source-id: 6c53a053e00defee0ab89f30e2f6bd2a1ff29bce
eagle2722
added a commit
to eagle2722/Recoil
that referenced
this pull request
Sep 21, 2024
Summary: Includes a re-implementation of the `act` testing API to decouple it from the mock Scheduler module. Because our Jest configuration mocks the Scheduler for all tests in www, some tests had become accidentally coupled to it. I had to update ~60 test files. The most common pattern I found was people calling `act()` with a no-op function, which had the effect of flushing all pending work. This no longer works in the new implementation. (We will eventually provide a way to opt into Scheduler mocking for advanced cases, but it probably won't be the default.) The fix was usually to wrap an earlier update in `act` to ensure that all its work is fully flushed. --- This sync includes the following changes: - **[27c9c95e2](facebook/react@27c9c95e2)**: act: Bypass microtask for "default sync" updates ([#21740](facebook/react#21740)) //<Andrew Clark>// - **[e577bfb1c](facebook/react@e577bfb1c)**: Add tests for invokeGuardedCallback ([#21734](facebook/react#21734)) //<Dan Abramov>// - **[355591add](facebook/react@355591add)**: Next/experimental release versions include commit date ([#21700](facebook/react#21700)) //<Brian Vaughn>// - **[d7dce572c](facebook/react@d7dce572c)**: Remove internal `act` builds from public modules ([#21721](facebook/react#21721)) //<Andrew Clark>// - **[06f7b4f43](facebook/react@06f7b4f43)**: `act` should work without mock Scheduler ([#21714](facebook/react#21714)) //<Andrew Clark>// - **[422e0bb36](facebook/react@422e0bb36)**: Delete test-utils implementation of `act` ([#21703](facebook/react#21703)) //<Andrew Clark>// Reviewed By: rickhanlonii Differential Revision: D29314763 fbshipit-source-id: 6c53a053e00defee0ab89f30e2f6bd2a1ff29bce
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since it's dev-only now, we can use the one provided by the reconciler.